package com.cat.model.web.action.api;

import java.math.BigDecimal;

import org.springframework.beans.factory.annotation.Autowired;

import com.cat.model.biz.service.api.InfoSearchService;
import com.cat.model.common.util.ErrorCode;
import com.cat.model.web.action.base.BaseAction;
import com.cat.model.web.bean.ModelInfoSearchBean;

public class MakeupAction extends BaseAction{

	/**
	 * 
	 */
	private static final long serialVersionUID = -402297982171388221L;
	
	private String cityCode;
	private String styleCode;
	private BigDecimal minPrice;//价格（小时）
	private BigDecimal maxPrice;//价格（小时）
	private Integer page;
	private Integer size;
	
	private Long makeupId;
	
	@Autowired
	private InfoSearchService infoSearchService;
	
	/**
	 * 化妆师搜索
	 */
	public void getMakeupList(){
		ModelInfoSearchBean model = new ModelInfoSearchBean();
		model.setCityCode(cityCode);
		model.setStyleCode(styleCode);
		model.setMinPrice(minPrice);
		model.setMaxPrice(maxPrice);
		
		print(infoSearchService.makeupList(model, page, size));
	}
	
	/**
	 * 化妆师信息查询
	 * */
	public void makeupInfo(){
		if(makeupId==null){
			print(ErrorCode.PARAM_ERROR.response());
			return;
		}
		
		print(infoSearchService.makeupInfo(makeupId));
	}
	
	/**
	 * 化妆师作品图查询
	 * */
	public void makeupScalePicture(){
		if(makeupId==null){
			print(ErrorCode.PARAM_ERROR.response());
			return;
		}
		
		print(infoSearchService.makeupScalePicture(makeupId));
	}
	
	/**
	 * 化妆师模特卡查询
	 * */
	public void makeupZedCard(){
		if(makeupId==null){
			print(ErrorCode.PARAM_ERROR.response());
			return;
		}
		
		print(infoSearchService.makeupZedCard(makeupId));
	}

	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}

	public String getStyleCode() {
		return styleCode;
	}

	public void setStyleCode(String styleCode) {
		this.styleCode = styleCode;
	}

	public BigDecimal getMinPrice() {
		return minPrice;
	}

	public void setMinPrice(BigDecimal minPrice) {
		this.minPrice = minPrice;
	}

	public BigDecimal getMaxPrice() {
		return maxPrice;
	}

	public void setMaxPrice(BigDecimal maxPrice) {
		this.maxPrice = maxPrice;
	}

	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public Integer getSize() {
		return size;
	}

	public void setSize(Integer size) {
		this.size = size;
	}

	public Long getMakeupId() {
		return makeupId;
	}

	public void setMakeupId(Long makeupId) {
		this.makeupId = makeupId;
	}

}
